let zsb = document.querySelector(".zsbox")
let mbx = document.querySelector(".back")
let productid = getQueryString('productId')

let xhr1 = new XMLHttpRequest()
xhr1.open("get",`http://chst.vip:1234/api/getproduct?productid=${productid}`)
xhr1.onload = function(){
    if(xhr1.status === 200){
        let res1 = JSON.parse(xhr1.responseText)
        let rrr = res1.result[0]
        // console.log(rrr)

        let divvv = ''
        zsb.innerHTML = `
        <div>
            <div class="zsboximg">
                ${rrr.productImg}
            </div>

            <div class="zsboxjs">
                ${rrr.productName}
            </div>
            
            
            <div>
                ${rrr.bjShop}
            </div>
        </div>
        `
        

    }
}
xhr1.send(null)







let plb = document.querySelector(".plqbox")



let xhr1112 = new XMLHttpRequest()
xhr1112.open("get",`http://chst.vip:1234/api/getproductcom?productid=${productid}`)
xhr1112.onload = function(){
    if(xhr1112.status === 200){
        let res1112 = JSON.parse(xhr1112.responseText)
        // console.log(res1112.result)
        let fh =''
        let zi =''

        res1112.result.forEach((item,index) => {
            

            zi +=
            `
            <div class="plqboxdy">
                <div class="plqboxsz">
                    <span>${item.comName}</span>
                    <span>${item.comTime}</span>
                </div>
                <div class="plqboxwy">${item.comContent}</div>
                <div  class="plqboxdysp">
                <span>${item.comFrom}</span>
                </div>
            </div>
            `
        })

        plb.innerHTML = zi
    }
}
xhr1112.send(null)